package com.heima.admin.controller;

import com.heima.model.admin.dtos.AdLoginDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.heima.admin.service.AdUserLoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 管理员登录行为信息表 前端控制器
 * </p>
 *
 * @author itheima
 */
@Slf4j
@RestController
@RequestMapping("/login")
public class AdUserLoginController {

    @Autowired
    private AdUserLoginService  adUserLoginService;

    @PostMapping("/in")
    public ResponseResult login(@RequestBody AdLoginDto adLoginDto){
        return adUserLoginService.login(adLoginDto);

    }
}
